const routers = {
	index: '/cms/page/index',
}

module.exports = {
	ifr(route) {
		return routers[route]
	},

	loc(route) {
		let url = routers[route]
		if (!url)
			return false
		location.href = url
		return false
	},

	funcVerify(user, func_id) {
		if (user.func_ids.indexOf(func_id) > -1)
			return true
		$.messager.alert('警告', '没有权限！');
		return false
	},
}